package com.dagene.weixin.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "access_state")
public class AccessState {

	long id;
	String openid; // 用户的标识
	int opercode; // 操作ID（会话状态）, 1000:未接入, 1001:已接入
	Date time; // 操作时间
	String worker; // 客服名
	int matchnumber; // 聊天匹配编号

	WeixinUserInfo userinfo;

	public AccessState() {

	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public int getOpercode() {
		return opercode;
	}

	public void setOpercode(int opercode) {
		this.opercode = opercode;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getWorker() {
		return worker;
	}

	public void setWorker(String worker) {
		this.worker = worker;
	}

	@Transient
	public WeixinUserInfo getUserinfo() {
		return userinfo;
	}

	public void setUserinfo(WeixinUserInfo userinfo) {
		this.userinfo = userinfo;
	}

	public int getMatchnumber() {
		return matchnumber;
	}

	public void setMatchnumber(int matchnumber) {
		this.matchnumber = matchnumber;
	}

}
